package com.dnndo.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 作品实体类
 */
@Data
@TableName("opus")
public class Opus {

    /**
     * 作品ID
     */
    @TableId(value = "opus_id")
    private Integer opusId;

    /**
     * 作品名称
     */
    @TableField("opus_name")
    private String opusName;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @TableField("updated_at")
    private Date updatedAt;

    /**
     * 学校ID
     */
    @TableField("school_id")
    private Integer schoolId;

    /**
     * 图片地址
     */
    @TableField("opus_url")
    private String opusUrl;

    /**
     * 点赞总数
     */
    @TableField("total_likes")
    private Integer totalLikes;

    /**
     * 总浏览量
     */
    @TableField("page_view")
    private Integer pageView;

    /**
     * 作品描述
     */
    @TableField("opus_discription")
    private String opusDescription;

    @Override
    public String toString() {
        return "Opus{" +
                "opusId=" + opusId +
                ", opusName='" + opusName + '\'' +
                ", userId=" + userId +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", schoolId=" + schoolId +
                ", opusUrl='" + opusUrl + '\'' +
                ", totalLikes=" + totalLikes +
                ", pageView=" + pageView +
                ", opusDescription='" + opusDescription + '\'' +
                '}';
    }
}
